<circuit access="public">

	<fuseaction name="main">
		<set name="showSidebar" value="false"/>
		<do action="v.welcome" contentvariable="pageContent" />
	</fuseaction>
	
	<fuseaction name="projectList">
		<set name="showSidebar" value="true"/>
		<xfa name="deleteProject" value="c.deleteProject"/>
		<invoke object="application.projects" methodCall="getProjects()" returnvariable="qryProjects"/>
		<do action="v.projectList" contentVariable="pageContent"/>
	</fuseaction>
	
	<fuseaction name="newProject">
		<set name="showSidebar" value="true"/>
		<xfa name="frmSubmit" value="c.saveProject"/>
		<do action="v.newProject" contentvariable="pageContent" />
	</fuseaction>
	
	<fuseaction name="saveProject">
		<invoke object="application.projects" method="saveProject">
		    <argument name="name" value="#attributes.name#" />
		    <argument name="url" value="#attributes.url#" />
		    <argument name="buildfile" value="#attributes.buildfile#" />
		</invoke>
		<relocate url="#myself#c.projectList" type="client" addToken="false"/>
	</fuseaction>
	
	<fuseaction name="deleteProject">
		<invoke object="application.projects" method="deleteProject">
		    <argument name="projectid" value="#attributes.projectid#" />
		</invoke>
		<relocate url="#myself#c.projectList" type="client" addToken="false"/>
	</fuseaction>
	
</circuit>
